package com.example;
import java.time.LocalDateTime;

public class User {
    private String userId;
    private String username;
    private String passwordHash;
    private String role;
    private boolean mustChangePassword; // 密码重置标记
    private LocalDateTime registrationTime;
    private String phoneNumber;

    public User(String userId, String username, String passwordHash, String role, LocalDateTime registrationTime, String phoneNumber) {
        this.userId = userId;
        this.username = username;
        this.passwordHash = passwordHash;
        this.role = role;
        this.registrationTime = registrationTime;
        this.phoneNumber = phoneNumber;
    }

    public String getUserId() {
        return userId;
    }

    public LocalDateTime getRegistrationTime() {
        return registrationTime;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public boolean mustChangePassword() {
        return mustChangePassword;
    }

    public void setMustChangePassword(boolean mustChangePassword) {
        this.mustChangePassword = mustChangePassword;
    }

    public String getUsername() {
        return username;
    }

    public String getPasswordHash() {
        return passwordHash;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public void setPasswordHash(String passwordHash) {
        this.passwordHash = passwordHash;
    }
}